home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / jspel205.zip / manual.doc < prev    next >
Text File  |  1994-06-15  |  95KB  |  2,181 lines

  1.  
  2.  
  3.  
  4.               JSPELL 2.05 (Release date: Jun.15, 1994)
  5.  
  6.                    --- Shareware Version ---
  7.  
  8.                 Copyright 1993-1994 by Joohee Jeong
  9.  
  10.                   Nemosoft Technologies
  11.                   P.O.Box 1619
  12.                   El Cerrito, CA 94530, U.S.A.
  13.  
  14.                   Email: 73072.3651@compuserve.com
  15.                   Phone/Fax: (510) 528-8753
  16.  
  17.  
  18.   All product names referenced herein are trademarks or registered
  19.   trademarks of their respective holders.
  20.  
  21.  
  22.   Before proceed, please read the text files 00readme for
  23.  
  24.    (i)  Licensing, distribution and registration information,
  25.    (ii)  Disclaimer,
  26.  
  27. Table of Contents _________________________________________________
  28.  
  29.  
  30.   Chapter I.  Introduction
  31.  
  32.     1  Features of JSPELL
  33.     2  Installation
  34.     3  Test drive
  35.     4  Configuration and hardware compatibility
  36.     5  Terminologies
  37.  
  38.   Chapter II.  User's guide for JSPELL
  39.  
  40.     1  Characters, words and dictionaries
  41.       1.1 Legal characters and legitimate words
  42.       1.2 Base dictionary and user dictionary
  43.       1.3 Dictionary loading
  44.     2  TeX-mode
  45.       2.1 Selecting the TeX-mode
  46.       2.2 Legitimate subwords in TeX
  47.       2.3 Ignoring the TeX commands
  48.       2.4 Math ignore mode
  49.       2.5 Miscellanies
  50.     3  Running JSPELL, the spell checker
  51.       3.1 Overview
  52.       3.2 Capitalization of words
  53.       3.3 Menu
  54.       3.4 [Replace] and [rePlace all]
  55.       3.5 Adding spotted word to user dictionaries
  56.       3.6 Miscellanies
  57.     4  Configuration files and command line options
  58.     5  Usage tips
  59.  
  60.   Chapter III.  User's guide for dictman
  61.  
  62.     1  Introduction
  63.     2  Running dictman, the dictionary manager
  64.       2.1 [File] menus
  65.       2.2 [BaseDic] menus
  66.       2.3 [UserDic] menus
  67.       2.4 [Utilities] menus
  68.       2.5 [Help=F1] menus
  69.     3  Dictionary maintenance
  70.       3.1 Merging user dictionary to base dictionary
  71.       3.2 Deleting words from a base dictionary
  72.       3.3 Building up your own base dictionary
  73.  
  74.   Appendix A.  Networked mode
  75.  
  76.   Appendix B.  Frequently Asked Questions
  77.  
  78.   Appendix C.  History
  79.  
  80.   Index
  81. Chapter I.  Introduction ----------------------------------------
  82.  
  83.   I.1.  Features of JSPELL
  84.  
  85.    (1) Ease of use:
  86.        Practically you don't need to study or practice anything to
  87.        use JSPELL proficiently.  With JSPELL's on-line help and the
  88.        intuitive keystrokes, which are indicated by the highlighted
  89.        letters in the on-screen menu buttons, you will hardly need
  90.        to read the manual except for the advanced features of
  91.        JSPELL, which are not found in other spell checkers.  For
  92.        mouse users, spell-checking with JSPELL can even be fun.
  93.  
  94.    (2) Speed:
  95.        JSPELL is fast in dictionary loading, scanning input files
  96.        for misspelled words and finding suggestions for near
  97.        misspelled words.  For a typical PC with 386 CPU, JSPELL
  98.        needs less than two seconds in loading a 40,000 word
  99.        dictionary and a fraction of a second in building and
  100.        displaying the list of suggested words for a misspelled word.
  101.  
  102.    (3) Dictionary:
  103.        A unique feature of JSPELL is its ability to handle file
  104.        specific dictionary and multiple user dictionaries---you can
  105.        have a dictionary (or dictionaries) that are specific to the
  106.        input file.  The author of JSPELL found this feature very
  107.        convenient, more than he initially imagined. The accompanying
  108.        dictionary manager dictman is powerful and easy to use.
  109.        Merging your personal dictionaries to the space/time-
  110.        efficient base dictionary and/or building your own base
  111.        dictionary from scratch is done effortlessly.
  112.  
  113.    (4) TeX support:
  114.        Ignoring the TeX-commands (that start with the backslashes
  115.        `\') is just the beginning.  Refer to (Section 2.2) of this
  116.        manual for the complete description of how JSPELL handles TeX
  117.        documents.
  118.  
  119.    (5) Foreign characters:
  120.        Foreign characters can be handled in either
  121.         (i) extended ASCII characters, or
  122.         (ii) TeX commands (e.g., G\"odel, Erd\H{o}s).
  123.  
  124.    (6) Undo:
  125.        Not all popular spell checkers support undoing the previous
  126.        actions---up to 400 steps!  Moreover, JSPELL always displays
  127.        the last action at the bottom row of the screen for added
  128.        convenience.
  129.  
  130.    (7) Network support:
  131.        Each user can have his/her own configuration and personal
  132.        dictionary while sharing the executables and the base
  133.        dictionary with other users.
  134.  
  135.    (8) More...
  136.        There are countless features of JSPELL that will please you.
  137.        For instance, the [Find] menu item in the dictionary manager
  138.        can display all words in the dictionary that match the given
  139.        regular expression: e.g., the pattern "t???e" will give you
  140.        the list of all 5 letter words that start with `t' and end
  141.        with `e', such as "table", "taste", "tease", "tense" etc., in
  142.        just 3 to 5 seconds for a typical 386 machine. Imagine what
  143.        you can do with this in solving crossword puzzles!
  144.  
  145.  
  146.   I.2  Installation
  147.  
  148.     Installation and configuration:
  149.  
  150.      Prepare a "jspell directory", say C:\JSPELL, by the DOS command
  151.  
  152.        mkdir C:\JSPELL
  153.  
  154.      and copy all JSPELL files into this directory.  Then C:\JSPELL
  155.      should contain the following 12 files
  156.  
  157.      ------------------------------------------------------------------
  158.        filename      size (bytes)   description
  159.      ------------------------------------------------------------------
  160.        00readme          10,660     readme file
  161.        base.dic         172,285     English word list
  162.        dictman.exe       43,769     the dictionary manager executable
  163.        file_id.diz          317     FILE_ID.DIZ
  164.        jspell.cfg           886     configuration
  165.        jspell.exe        42,516     the spell checker executable
  166.        jspell.hlp        10,610     help messages
  167.        jsptex.cfg           270     TeX configuration
  168.        manual.doc        94,901     manual
  169.        register.doc      12,071     registration information
  170.        sample.txt         1,130     sample text for a test drive
  171.        vendor.doc         1,733     vendor information
  172.      ------------------------------------------------------------------
  173.  
  174.     In order to be able to run JSPELL (and DICTMAN) in any directory,
  175.     either add C:\JSPELL to your PATH or put two batch files
  176.     JSPELL.BAT and DICTMAN.BAT into one of your directories in PATH.
  177.     The content of the batch files jspell.bat and dictman.bat should
  178.     look like
  179.  
  180.     @echo off
  181.     C:\JSPELL\jspell.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
  182.  
  183.     and
  184.  
  185.     @echo off
  186.     C:\JSPELL\dictman.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
  187.  
  188.     respectively.
  189.  
  190.     The default configuration of JSPELL is set to VGA and AT-keyboard.
  191.     Also we assume that you work under the plain-vanilla DOS
  192.     environment. If your computer's configuration and/or environment
  193.     is different from this, then you will need to read (Section I.4)
  194.     of the documentation file manual.doc.
  195.  
  196.     If you are going to run JSPELL under a networked environment,
  197.     then please read (Appendix A.) of manual.doc to complete the
  198.     installation.
  199.  
  200.     In order to print out the documentation file manual.doc, your
  201.     printer must be able to handle the IBM graphic characters
  202.     correctly.
  203.  
  204.  
  205.   I.3  Test drive
  206.  
  207.     We assume that JSPELL (and dictman) has been correctly installed
  208.     on your computer.  If not, please refer to the installation
  209.     information in the previous section.
  210.  
  211.     Also, we suggest you making a hard copy of this documentation
  212.     file manual.doc (by a command like "copy manual.doc prn"), at
  213.     least this "Test drive" section, with your printer---you can't
  214.     test drive JSPELL while reading this file on a computer screen
  215.     unless you run two computers simultaneously. In order to print
  216.     out this documentation properly, your printer must be able to
  217.     handle the IBM graphic characters correctly.
  218.  
  219.     This test drive is for JSPELL only---not for dictman, which will
  220.     be needed only after you've determined to use JSPELL as your
  221.     spell checker.
  222.  
  223.     Try the following command at the DOS prompt:
  224.  
  225.       jspell
  226.  
  227.     You will see the following screen (and the DOS prompt).
  228.  
  229.       Usage: jspell [-options...] <filename>
  230.                to spell check <filename>, where
  231.                option = -bd <base dictionary name>
  232.                         -ud <user dictionary name>
  233.                         -fd <file dictionary name>
  234.                         -len n    (2 <= n <= 9)
  235.                         -t[+-]
  236.                         -math[+-]
  237.                         -percent[+-]                 or
  238.              jspell ?
  239.                to read the help screen.
  240.  
  241.     Don't worry about the -options for the time being.  The Usage
  242.     tells you that you can spell-check a file, say <filename>, by
  243.     the command "jspell filename".  We will test this on the text
  244.     file "sample.txt" which should exist in the same directory as
  245.     jspell.exe. (It won't take long.  After all, you can exit from
  246.     this test drive whenever you want by hitting Alt-X.)
  247.  
  248.     First, copy this sample file "sample.txt" to the current
  249.     directory by the command
  250.  
  251.       copy c:\jspell\sample.txt .
  252.  
  253.     or something like this.  Then execute the following command at
  254.     the DOS prompt:
  255.  
  256.       jspell sample.txt
  257.  
  258.     Three boxes will be shown on the screen.  The upper one is for
  259.     text display, the lower left one is for the suggested words, and
  260.     the lower right one is for the menu buttons. The row between the
  261.     upper and lower area is called the "edit row".  Each misspelled
  262.     word in the input file sample.txt will be highlighted in the
  263.     upper box and also displayed on the edit row.  The bottom row is
  264.     for displaying some information about the current working of
  265.     JSPELL.
  266.  
  267.     First, JSPELL will briefly display the message that looks like
  268.  
  269.       Loading "C:\JSPELL\base.dic".....
  270.  
  271.     at the bottom row, and then spot/highlight the first misspelled
  272.     word "jspell" at the center row of the upper box. Also the edit
  273.     row will display the highlighted word "jspell" with a half-block
  274.     cursor flashing at the end of the word.
  275.  
  276.     Now press DownArrow to highlight the suggested word "spell" and
  277.     then press ENTER.  You should be able to see that the word
  278.     "jspell" has been replaced by "spell" and the second misspelled
  279.     word "typcal" is now being spotted/highlighted.
  280.  
  281.     Actually, replacing "jspell" by "spell" was not our intention.
  282.     We wanted to [iGnore all] the word "jspell" which occurs several
  283.     times in this sample text file.  So, hit Alt-U (or click on the
  284.     menu button [Undo]) to undo the previous action.  Then a dialog
  285.     box will pop-up at the center of the screen asking us to choose
  286.     one of the three options "Undo", "Cancel" or "Undo further".
  287.     Choose the default option "Undo" by either (highlighting "Undo"
  288.     and) pressing ENTER or clicking the left mouse button on it. Now
  289.     we are back to the previous step. This time, press Alt-G (or
  290.     click on the menu button [iGnore all]) to ignore all the
  291.     subsequent occurrences of "jspell" as well as this spotted one.
  292.  
  293.     JSPELL should be spotting/highlighting the word "typcal" now.
  294.     Naturally we want to replace this by the suggested word
  295.     "typical".  There are several ways of doing this:
  296.  
  297.     o  Highlight "typical" and then press ENTER, or
  298.     o  Press the key 1, or
  299.     o  Click left mouse button on the suggested word "typical".
  300.  
  301.     Do any one of these three actions.
  302.  
  303.     Now we want to add the next spotted/highlighted word "CPU" into
  304.     the user dictionary.  We do this by pressing Alt-A or clicking
  305.     on the menu button [Add to user.dic].  Then JSPELL asks us to
  306.     select one of the three possible capitalizations "CPU", "Cpu" or
  307.     "cpu".  We should choose the first one, "CPU".
  308.  
  309.     Next, you will see that the misspelled word "teh" is spotted/
  310.     highlighted. (By the way, although the previous word "CPU" is no
  311.     longer shown on the upper box, we can still see that the last
  312.     action was adding "CPU" to the user dictionary user.dic by
  313.     looking at the bottom row.)  Note that the row in the upper box
  314.     containing the spotted word "teh" has two occurrences of the
  315.     word "jspell" which were not caught because we have ignored
  316.     "jspell" globally.
  317.  
  318.     We replace this misspelled word "teh" by the correct word "the"
  319.     by hitting 6.  Then we see that another "teh" is spotted by
  320.     JSPELL. Thus we realize that we should have done [rePlace all]
  321.     instead of simple [Replace].  To this end, we first undo the
  322.     last action and then hit Alt-P after highlighting "the" in the
  323.     lower left box (or alternatively, you may click the left mouse
  324.     button on the suggested word "the" while pressing down the Ctrl
  325.     key).
  326.  
  327.     The next spotted word "jsspell" lies on a rather long line, but
  328.     JSPELL handles this situation with no problem. In fact, the
  329.     limit on the line length in the input file is as large as 512
  330.     characters. Note that the correct word "jspell" is suggested
  331.     although it's not in the dictionary. (Recall that "jspell" had
  332.     been globally ignored.)  Now replace "jsspell" by "jspell".
  333.  
  334.     The rest of this test drive is for the TeX-mode. The currently
  335.     spotted word "sl" is a valid TeX-command.  So we could just
  336.     ignore this "sl" or add it to user.dic.  But surely there is a
  337.     better solution: just ignore all words that follow the backslash
  338.     character `\', namely the TeX-commands.
  339.  
  340.     Normally, JSPELL chooses this TeX-mode automatically if (and
  341.     only if) the input file name has extension ".tex".  But we can
  342.     force the TeX-mode by the command line switch -t. So we'll end
  343.     this session and spell-check this text file sample.txt again in
  344.     TeX-mode.
  345.  
  346.     It's good time to test the [eXit] menu.  Hit Alt-X. Then JSPELL
  347.     will pop-up a window asking you to choose one of the following:
  348.  
  349.       Yes        (save changes before exit), or
  350.       No         (do not save changes and exit), or
  351.       Cancel     (do not exit, and continue JSPELL).
  352.  
  353.     We choose the first option "Yes" for now.
  354.  
  355.     Before starting another JSPELL session, you might want to look
  356.     into your user.dic file in the "jspell directory" to check that
  357.     the word "CPU" has really got in there.   Now enter the command
  358.  
  359.       jspell -t sample.txt
  360.  
  361.     We see that "jspell" is spotted again because [iGnore all] has
  362.     effect only on that particular session.  So, this time we will
  363.     put this word "jspell" in the file specific dictionary
  364.     sample.dic, by hitting Alt-T (or clicking mouse on the
  365.     appropriate menu button).
  366.  
  367.     The next spotted word should be "Pythagoras".  We put this word
  368.     into sample.dic.  (If you are bothered by the jspell's pop-up
  369.     window asking you to choose capitalization, then you may do
  370.     Shift-Alt-T or Shift-LeftMouseClick on [add To sample.dic].)
  371.  
  372.     Now JSPELL is done with this input file.  It will show you some
  373.     information about the session (such as the number of words that
  374.     have been spotted etc.) and displays a pop-up window with two
  375.     choices Exit and Cancel.  If you choose Cancel, then you can
  376.     undo the last action on "Pythagoras".  Otherwise, you just exit.
  377.  
  378.     Note that JSPELL ignored the 5 words "sl", "XY", "XZ", "YZ" and
  379.     "Wat" which would have been caught if TeX-mode had not been
  380.     used.
  381.  
  382.     You may want to look into the file sample.dic, which has been
  383.     created in the current directory by this JSPELL session.  It
  384.     should contain the two words "Pythagoras" and "jspell".  These
  385.     two words are considered to be in our vocabulary for input files
  386.     whose filenames are of the form sample.<ext>, where <ext> is any
  387.     extension, including the empty one.
  388.  
  389.     Note that the original file has been saved in a backup file named
  390.     sample.bak in the current directory.
  391.  
  392.     Remark:  In this test drive section, there are three places
  393.     where we made (slightly) wrong statements---on purpose to avoid
  394.     excessive details.  We'll continue this practice of deliberate
  395.     lying to the rest of this manual whenever it is appropriate.
  396.  
  397.  
  398.   I.4  Configuration and hardware
  399.  
  400.     JSPELL and dictman need IBM-PC 100% compatible computer because
  401.     they use direct video for fast screen update.  Also they use
  402.     low-level keyboard reading.  Thus some (old) IBM compatible
  403.     computers may not be able to run jspell/dictman successfully.
  404.  
  405.     For videos, VGA, EGA, CGA and Hercules are supported.  Other
  406.     video cards may or may not work.
  407.  
  408.     JSPELL uses two configuration files jspell.cfg and jsptex.cfg.
  409.     Both of these are plain ASCII text files.  jsptex.cfg is for
  410.     TeX-mode only and has nothing to do with the computer hardware.
  411.     In fact, only the first three entries of jspell.cfg are
  412.     pertinent to the hardware. So we will concentrate on these first
  413.     few lines of jspell.cfg in this section and defer the discussion
  414.     of the rest until later sections in this manual.
  415.  
  416.     The configuration variables in jspell.cfg have effect on the
  417.     behavior of both JSPELL and dictman.   A typical jspell.cfg
  418.     looks like:
  419.  
  420.       AT             % keyboard (AT or XT)
  421.       VGA            % video card  (CGA,EGA,VGA or Hercules)
  422.       Enhanced       % color option  (Standard,Enhanced,Monochrome
  423.                                       or Laptop)
  424.       ...  more ...
  425.       ...  more ...
  426.  
  427.     The meanings of these three configuration variables should be
  428.     more or less obvious---if you have an AT-keyboard, then choose
  429.     the AT option, otherwise choose the XT option and so on.  If you
  430.     want change a variable, say AT to XT, then you may simply
  431.     replace "AT" by "XT" using your favorite text editor.
  432.  
  433.     The order of these configuration variables does matter.
  434.     So be careful not to mess up the order. Upper/lower-case is
  435.     ignored.
  436.  
  437.     The difference between AT-keyboards and XT-keyboards is not that
  438.     important.  With AT, you can use certain keystrokes that are not
  439.     recognized by XT: e.g., CtrlUpArrow and CtrlDownArrow are only
  440.     recognized by AT-keyboards.
  441.  
  442.     For video cards not among the four supported ones, it may still
  443.     be possible to run jspell/dictman by selecting suitable options
  444.     by trial and error. Just note that Enhanced color option is for
  445.     VGA or EGA only.
  446.  
  447.     About the color options, many people prefer the Enhanced option
  448.     to the Standard option. But if you run JSPELL in a DOS box under
  449.     Windows (or you just prefer Standard to Enhanced for any reason)
  450.     then you may switch to the Standard option by simply replacing
  451.     "Enhanced" by "Standard" in the third line of the file
  452.     jspell.cfg.
  453.  
  454.     The Laptop option is basically Monochrome that can't display
  455.     "bright white" properly. So the command keys are highlighted by
  456.     inverse video instead of bright white if you choose this Laptop
  457.     option.
  458.  
  459.  
  460.   I.5  Terminologies
  461.  
  462.     As you may have already noticed, this manual uses the word
  463.     "jspell" somewhat ambiguously: sometimes it means the
  464.     jspell/dictman combo and sometimes it means only the spell
  465.     checker jspell.exe. Another example of our abuse of terminology
  466.     is the word TeX--- it usually means TeX/LaTeX: for instance, the
  467.     LaTeX-command \newenvironment is not really a TeX command in the
  468.     strict sense, but in this manual we may just say "the
  469.     TeX-command \newenvironment ..." for convenience.
  470.  
  471.     We want use the term jspell directory to mean the directory in
  472.     which JSPELL is installed: i.e., the directory in which all
  473.     JSPELL files reside.  But if we think about running JSPELL over
  474.     a networked environment, where each user may want to update
  475.     user.dic and/or base.dic, it becomes evident that we need some
  476.     sort of personal jspell directory for each user.
  477.  
  478.     For the single user mode, jspell directory will mean the
  479.     directory in which the JSPELL executable file jspell.exe
  480.     resides.  It is this directory where the JSPELL files such as
  481.     dictman.exe, jspell.cfg, jsptex.cfg and jspell.hlp normally
  482.     reside. jspell directory is also the default directory for
  483.     base.dic and user.dic.
  484.  
  485.     For the networked mode, jspell executable directory will mean
  486.     the directory in which jspell.exe resides.  We must put the
  487.     files dictman.exe and jspell.hlp in this directory. But the
  488.     other two files jspell.cfg and jsptex.cfg may exist in the
  489.     jspell configuration directory which is defined by the
  490.     environment variable JSPELL_DIR, which is normally set by
  491.     autoexec.bat. Also this jspell configuration directory is the
  492.     default directory for base.dic and user.dic.
  493.  
  494.     For the detailed discussion on this subject, the readers are
  495.     referred to (Appendix A.).  In (Chapter 2) and (Chapter 3), we
  496.     will always assume that JSPELL is being run under the single
  497.     user mode.
  498. Chapter II.  User's guide for JSPELL ----------------------------
  499.  
  500.   II.1  Characters, words and dictionaries
  501.  
  502.   II.1.1  Legal characters and legitimate words
  503.  
  504.     Following are the list of legal characters that can be used in
  505.     words:
  506.  
  507.       abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
  508.       ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜáíóúñÑß
  509.  
  510.     In addition, we may use the following special characters that
  511.     can be used in words in some circumstances:
  512.  
  513.       " ' - . = \ ^ ` { } ~
  514.  
  515.     A finite sequence <word> of legal characters and/or special
  516.     characters can be considered to be a legitimate word only if the
  517.     length of <word> is in between MinWordLen and 40, where
  518.     MinWordLen is some number in between 2 and 9 and defined in the
  519.     configuration file (as the 11th entry). This configuration
  520.     variable can be overridden by the command line switch -len For
  521.     instance
  522.  
  523.       jspell -len 3 <sample>
  524.  
  525.     will ignore all words in the text file <sample> that has length
  526.     1 or 2.
  527.  
  528.     Suppose that <word> has proper length.  In non-TeX-mode, the
  529.     only special character that can appear in <word> is the
  530.     apostrophe ('). Moreover, there's some restriction in the use of
  531.     apostrophe in <word>.  It must occur at the end of <word> as
  532.     *n't, *'ve, *'re or *'ll, where * denotes any sequence of
  533.     characters.
  534.  
  535.     To summarize, when JSPELL runs in non-TeX-mode, a finite
  536.     sequence <word> of legal characters and/or apostrophe is a
  537.     legitimate word if and only if it has length in between
  538.     MinWordLen and 40 and satisfies the condition on apostrophe as
  539.     described in the paragraph above.
  540.  
  541.     In TeX-mode, the definition of legitimate words gets more
  542.     complicated.  For this subject, refer to (Section II.2.2) in
  543.     this chapter.
  544.  
  545.  
  546.   II.1.2  Base dictionary and user dictionary
  547.  
  548.     Dictionary means a file that contains a list of words in some
  549.     systematic way.  (Sometimes we may use this term dictionary to
  550.     mean the list of words in the computer memory that have been
  551.     loaded from a dictionary file.)
  552.  
  553.     Two types of dictionaries are used by jspell: one is "base
  554.     dictionary" and the other is "user dictionary".
  555.  
  556.     Base dictionary exploits the common prefix/suffixes of words to
  557.     reduce the file size.  (Current version of jspell supports only
  558.     English prefix/suffix.  Future versions will allow user
  559.     configurable prefix/suffix for foreign languages.) Also loading
  560.     a base dictionary is fast because it is read into the memory
  561.     directly (i.e., no computation for building up data-structures).
  562.     If you want to make any change on the content of base
  563.     dictionary, then it must be done by dictman, the dictionary
  564.     manager for jspell.
  565.  
  566.     To see the extent of the space saving obtained by this
  567.     prefix/suffix business, run the [BaseDic][Expand] menu in
  568.     dictman.  It will create an ASCII text file that contains all
  569.     words in the base dictionary currently loaded in the computer
  570.     memory.
  571.  
  572.     User dictionary is simply an ASCII text file that contains one
  573.     word per line.  The words are alphabetically sorted for the ease
  574.     of maintenance---you can edit this file directly using any text
  575.     editor.  jspell reads user dictionary line by line.  If jspell
  576.     encounters a space character (i.e., space, tab, carriage return,
  577.     end of line etc.), then it ignores the rest of the line. If an
  578.     illegitimate word is encountered during loading, then jspell
  579.     exits with an error message.
  580.  
  581.     jspell supports the use of "multiple user dictionaries" and the
  582.     "file specific user dictionary" as explained in the next
  583.     section.
  584.  
  585.  
  586.   II.1.3  Dictionary loading
  587.  
  588.     When jspell starts it looks for the default base dictionary, say
  589.     base.dic, in the current directory, where the default dictionary
  590.     name is defined in the configuration file jspell.cfg (as the
  591.     12th entry). If it finds one, then the base dictionary is loaded
  592.     into the computer memory.  Otherwise jspell continues searching
  593.     base.dic in the jspell directory.  If both searches fail, then
  594.     jspell exits with an appropriate error message. You can override
  595.     the default base dictionary name defined in jspell.cfg by the
  596.     command line switch -bd for instance,
  597.  
  598.       jspell -bd german.dic <filename>
  599.  
  600.     will spell-check the file <filename> using the base dictionary
  601.     "german.dic".
  602.  
  603.     As we mentioned above jspell allows us to use more than one user
  604.     dictionaries.  There is one special user dictionary, called the
  605.     main user dictionary, which is used for *all* jspell-check
  606.     sessions.  User dictionaries other than the main one may or may
  607.     not be used in jspell-checking depending on the filename of the
  608.     input text file.
  609.  
  610.     Dictionary loading of the main user dictionary is similar to
  611.     that of base dictionary, with one minor difference explained in
  612.     the next paragraph.  The default main user dictionary name is
  613.     normally user.dic and defined in the configuration file
  614.     jspell.cfg (as the 13th entry).  It can be overridden by the
  615.     command line switch -ud for instance,
  616.  
  617.       jspell -ud math.dic <filename>
  618.  
  619.     will spell-check the file <filename> using the main user
  620.     dictionary  math.dic.
  621.  
  622.     The difference between the loading of the base dictionary and
  623.     the main user dictionary is that if both searches fail (one in
  624.     the current directory and the other in the  jspell directory)
  625.     then jspell exits with an error message in the former case,
  626.     while in the latter case jspell
  627.  
  628.       (i) does not complain anything in case the default main user
  629.           dictionary defined in jspell.cfg has been used,
  630.  
  631.       (ii) gives warning and option to choose between continue or
  632.            abort in case the command line defined main user
  633.            dictionary has been used.
  634.  
  635.     If the main user dictionary is not found in either of the
  636.     directories but some words are added into the main user
  637.     dictionary during a spell-check session, then a new dictionary
  638.     is created in the jspell directory.
  639.  
  640.     The default file specific dictionary of a file <filename>.<ext>
  641.     is defined to be a user dictionary with filename
  642.     <filename>.dic.
  643.  
  644.     Dictionary loading of the file specific dictionary, or file
  645.     dictionary for short, is the same as that of the main user
  646.     dictionary.  The default file dictionary name can be overridden
  647.     by the command line switch -fd -fd for instance,
  648.  
  649.       jspell -fd project1.dic <filename>
  650.  
  651.     will spell-check the file <filename> using the file dictionary
  652.     "project1.dic" (instead of the default one <filename>.dic).
  653.  
  654.     If the file dictionary is not found in either of the directories
  655.     but some words are added into the file dictionary during a
  656.     spell-check session, then a new dictionary is created in the
  657.     current directory.  (This is different from the main user
  658.     dictionary case.)
  659.  
  660.     You may use additional user dictionaries specific to a text file
  661.     <filename>.<ext> by specifying them in the file dictionary, say
  662.     <filename>.dic, in the following way, which is how jspell
  663.     supports the use of multiple user dictionaries.  Suppose that
  664.     you want to use two additional dictionaries "math.dic" and
  665.     "comp.dic". Then just add two lines +math.dic and +comp.dic at
  666.     the beginning of the file dictionary <filename>.dic---so the
  667.     content of the resulting file dictionary for our input file
  668.     <filename>.<ext> should look like:
  669.  
  670.       +math.dic
  671.       +comp.dic
  672.       <word1>
  673.       <word2>
  674.       ...
  675.       ...
  676.  
  677.     As usual, these additional user dictionaries are first searched
  678.     in the current directory and then in the jspell directory. If
  679.     both searches fail, then jspell exists with an error message. Up
  680.     to 9 additional user dictionaries can be used.
  681.  
  682.     Among the dictionaries mentioned above, the main user dictionary
  683.     and the file dictionary may be updated by a jspell session.  So
  684.     if these two dictionaries happen to have the same filename, then
  685.     the filename collision problem occurs, and jspell exists with an
  686.     appropriate error message.  Other types of dictionary name
  687.     collision is less harmful and thus silently ignored by jspell.
  688.     (Some computing resources are wasted due to the duplicate copy
  689.     of the same dictionary.)
  690.  
  691.     Since user dictionaries (main, file, or additional) can be
  692.     freely edited by any text editor, there is a possibility that an
  693.     illegitimate word creeps into one of these dictionaries.  If
  694.     jspell finds an illegitimate word during the initial dictionary
  695.     loading, then it exits with an error message at the bottom of
  696.     the screen indicating the first encounter of (i) the
  697.     illegitimate word <badword>, (ii) the dictionary that contains
  698.     <badword> and (iii) the line in which <badword> occurs.  You
  699.     should immediately delete or fix this <badword>.
  700.  
  701.     If the same word exists in more than one places---in different
  702.     dictionaries or in the same dictionary---then it is silently
  703.     ignored by jspell. (Some computing resources are wasted due to
  704.     the duplicate copy of the same word.)
  705.  
  706.     One final remark: extension of dictionary files need not
  707.     necessarily be .dic.  It's just convenient to stick to this
  708.     naming convention in most situations.
  709.  
  710.  
  711.   II.2  TeX-mode
  712.  
  713.   II.2.1  Selecting the TeX-mode
  714.  
  715.     This mode is automatically selected if the extension of the
  716.     input file is ".tex", case insensitive.  You may override this
  717.     convention by the command line switch -t[+-].   For instance,
  718.     you may force the TeX-mode to the file <filename>.<ext> by
  719.  
  720.       jspell -t <filename>.<ext>
  721.  
  722.     Conversely, you may force non-TeX-mode to the file
  723.     <filename>.tex by
  724.  
  725.       jspell -t- <filename>.tex
  726.  
  727.     -t+ has the same effect as -t.
  728.  
  729.  
  730.   II.2.2  Legitimate subwords in TeX
  731.  
  732.     First of all, any legitimate word in non-TeX-mode is legitimate
  733.     in the TeX-mode also.
  734.  
  735.     In addition, we can use the accenting commands as part of a
  736.     legitimate word.  Thus the following 21 strings are legitimate
  737.     subwords
  738.  
  739.        \`     \`{?}  \'     \'{?}  \^     \^{?}  \"
  740.        \"{?}  \~     \~{?}  \=     \={?}  \.     \.{?}
  741.        \u{?}  \v{?}  \H{?}  \c{?}  \d{?}  \b{?}  \t{??}
  742.  
  743.     where ? denotes any single character.
  744.  
  745.     Next, there are 11 special TeX commands that are legitimate
  746.     subwords:
  747.  
  748.       \oe \OE \ae \AE \aa \AA \o \O \l \L \ss
  749.  
  750.     which are used to generate the following symbols
  751.  
  752.       * omitted in this ASCII version of the manual *
  753.  
  754.     respectively.
  755.  
  756.     Further, we allow the use of braces { and } for various
  757.     circumstances like \ss{}, {\oe} etc.
  758.  
  759.     Finally, we allow the hyphenation command \- to be part of
  760.     legitimate words.
  761.  
  762.  
  763.   II.2.3  Ignoring the TeX commands
  764.  
  765.     First of all, jspell ignores all TeX (and LaTeX) commands
  766.     (except the 11 special ones mentioned in the previous section):
  767.     i.e., all words following the escape character `\'. Note that if
  768.     `\' is not used as an escape character, as in the second
  769.     occurrence in the command `\\', jspell doesn't ignore the
  770.     subsequent word---this is illustrated in the following example:
  771.  
  772.       We explain \fbox{gnus} in the next line. \\THis is ...
  773.  
  774.     jspell will ignore the command "fbox" but catch "THis" as a
  775.     misspelled word.
  776.  
  777.     Some TeX commands take arguments which need not be usual words.
  778.     For instance, in the text
  779.  
  780.       On this topic, readers are referred to \cite{Knu88a} ...
  781.  
  782.     we want the word "Knu" be ignored.  So jspell will ignore an
  783.     <word> appearing as \cite{<word>}.  Since <word> itself may
  784.     contain { and }, the exact rule is: ignore until the first right
  785.     brace that matches the first left brace after the command \cite,
  786.     where literal braces following the escape character \ are not
  787.     counted.
  788.  
  789.     Some TeX commands take more than one arguments.  jspell takes
  790.     this into account too: e.g., it ignores <word1> and <words2>
  791.     appearing as
  792.  
  793.       \newcommand{<word1>}{<word2>}
  794.  
  795.     Note that <word1> and/or <word2> can be rather long and may span
  796.     several lines.
  797.  
  798.     We call this number of arguments of a TeX command "arity". The
  799.     arity of \cite is 1, the arity of \newcommand is 2, and the
  800.     arity of \newenvironment is 3 etc.  In fact these arities of
  801.     TeX commands are user definable by editing the configuration
  802.     file "jsptex.cfg".  If a line in jsptex.cfg is
  803.  
  804.     <n>mycommand,
  805.  
  806.     where <n> is a numeral, then the arity of \mycommand will be set
  807.     to be <n>.  An exception to this is the <n> = 0 case.  This is
  808.     supplied to treat some commands like \input that has fuzzy
  809.     syntax.  (Both "\input <filename>" and "\input{<filename>}" are
  810.     accepted.)  Following are the the default arity/command pairs
  811.     defined in jsptex.cfg.
  812.  
  813.       0input
  814.       1include
  815.       1includeonly
  816.       1documentstyle
  817.       1newcounter
  818.       1hyphenation
  819.       1label
  820.       1ref
  821.       1bibitem
  822.       1pageref
  823.       1cite
  824.       1nocite
  825.       2newcommand
  826.       2renewcommand
  827.       2newtheorem
  828.       3newenvironment
  829.       3renewenvironment
  830.  
  831.     The commands \begin and \end are treated specially. The arity of
  832.     \begin is not fixed---normally it is 1, but sometimes it can be
  833.     2 as you can see in the following example:
  834.  
  835.       \begin{array}{llcr}
  836.  
  837.     We don't want to see jspell reporting "llcr" as a misspelled
  838.     word.  A similar situation arises when "array" in the example
  839.     above is replaced by one of "tabular", "figure" and "table".
  840.     Another thing that we should consider is that the commands
  841.     \begin and \end are used in setting on/off math ignore mode,
  842.     which is explained in detail in the following section.
  843.  
  844.     So these two special commands \begin and \end are hard-coded in
  845.     jspell and do not appear in the TeX command configuration file
  846.     jsptex.cfg.
  847.  
  848.     The number of commands that are accepted in jsptex.cfg can
  849.     be 32 at maximum.
  850.  
  851.  
  852.   II.2.4  Math ignore mode
  853.  
  854.     By default, jspell do not spell-check text in math mode which is
  855.     defined by one of the followings:
  856.  
  857.       $   <math mode>  $
  858.       $$  <math mode>  $$
  859.       \(  <math mode>  \)
  860.       \[  <math mode>  \]
  861.       \begin{math}       <math mode>    \end{math}
  862.       \begin{equations}  <math mode>    \end{equation}
  863.       \begin{eqnarray}   <math mode>    \end{eqnarray}
  864.       \begin{eqnarray*}  <math mode>    \end{eqnarray*}
  865.  
  866.     Math mode across multiple lines are supported of course.
  867.  
  868.     The reason why jspell ignores text in math mode is that many
  869.     nonwords may occur in math mode as in the following example:
  870.  
  871.       $$ {\sl XY}^2 + {\sl XZ}^2 = {\sl XZ}^2 $$
  872.  
  873.     On the other hand, we may want jspell not ignore the text in
  874.     math mode in the following example:
  875.  
  876.       $$ {\sl base}^2 + {\sl height}^2 = {\sl hypotenus}^2 $$
  877.  
  878.     (Note the typo "hypotenus" in math mode.)  If you prefer to
  879.     disable this math mode ignoring feature of jspell, then you can
  880.     do so by editing the configuration file jspell.cfg, the sixth
  881.     entry, to replace MathIgnore by MathNoIgnore.
  882.  
  883.     Alternatively math ignoring can be set/unset by the command line
  884.     switch -math[+-]
  885.  
  886.       jspell -math+ <filename>
  887.  
  888.     will force jspell to spell-check text in math mode and
  889.  
  890.       jspell -math- <filename>
  891.  
  892.     will force jspell to ignore text in math mode.  The switch
  893.     -math has the same effect as -math+.
  894.  
  895.  
  896.   II.2.5  Miscellanies
  897.  
  898.     TeX ignores any input after the percent symbol % until the end
  899.     of line.  So it could be desirable for jspell to follow this
  900.     after-%-ignoring convention of TeX. For example, we can think of
  901.     the following situation:
  902.  
  903.       Send \$25.00 to ...      % don't forget \ before $
  904.       Here is a tyypo ...
  905.  
  906.     If jspell gets no effect from %, then it will think that the
  907.     last character $ on the line containing % starts math mode, and
  908.     thus the word "tyypo" would not be caught as a misspelled word
  909.     (assuming that the math ignore mode is on).
  910.  
  911.     This after-%-ignore mode is set by the 10th entry of the
  912.     configuration file jspell.cfg:  if it is pIgnore, then jspell
  913.     ignores characters in a line after the first nonliteral
  914.     occurrence of %, and if it is pNoIgnore then % has no special
  915.     effect on the behavior of jspell.
  916.  
  917.     You can override this by the command line switch -percent[+-].
  918.     The switch -percent (or equivalently -percent+) set's the
  919.     after-%-ignore mode on regardless of what's been defined by the
  920.     configuration file jspell.cfg.  The switch -percent- is the
  921.     opposite of -percent+.
  922.  
  923.     We don't claim that jspell can handle all possible situations of
  924.     TeX appropriately.  For instance jspell doesn't understand the
  925.     following (unnatural) construction:
  926.  
  927.       ... the following displayed equation $% some comment
  928.       $ x^2 + y^2 = z^2.  $$ It is believed that above
  929.       argument was first invented by ...
  930.  
  931.     jspell thinks that "some comment" is in math mode and "It is
  932.     believed ..." is the beginning of displayed math mode, which is
  933.     absurd. So if you are determined to fool jspell, then it's
  934.     relatively easy to do so by using the comment character %---on
  935.     the other hand such a situation (that jspell is fooled) will
  936.     seldom occur unless you intentionally create that.
  937.  
  938.  
  939.   II.3  Running jspell, the spell checker
  940.  
  941.     This section describes the detail of the usage of the spell
  942.     checker jspell.  If you use jspell for the first time, then
  943.     perhaps the earlier section Test drive will be sufficient for
  944.     you.
  945.  
  946.   II.3.1  Overview
  947.  
  948.     To jspell-check an ASCII file <filename>, you first go to the
  949.     directory in which <filename> resides and then enter the command
  950.  
  951.       jspell [-options...] <filename>
  952.  
  953.     at the DOS prompt.  (<filename> may contain path. In this case
  954.     you don't have to go to the directory of <filename> of course.)
  955.  
  956.     The [-options...], which have been mentioned at least once in
  957.     earlier sections,  will be explained in detail in the next
  958.     section.
  959.  
  960.     In a typical situation of a jspell session, a misspelled word
  961.     <word> in <filename> (assuming that at least one misspelled word
  962.     exists) is highlighted and shown together with the surrounding
  963.     text in the 78x11 sized box occupying the upper half of the
  964.     screen.  <word> is also displayed in the row at the middle of
  965.     the screen right below the upper box, namely the edit row. Also
  966.     the action of the user on the previous misspelled word is
  967.     displayed at the bottom of the screen (unless <word> is the
  968.     first misspelled word in <filename>).
  969.  
  970.     Words in the jspell's dictionary that are *close* to <word> are
  971.     displayed in the lower left box: i.e., the suggestion area.  Up
  972.     to 16 suggested words can be displayed. Under the "Numbered"
  973.     option (which is the default), the highlighted numeral n is
  974.     shown in front of the n-th suggested word.  (For n > 8, @m is
  975.     shown in place of n where m := n - 8.)  These numerals give us a
  976.     handy way of selecting a word from the list of the suggested
  977.     words. We will discuss this in detail in (Section II.3.4). You
  978.     may disable this Numbered option by editing the 9th entry of the
  979.     configuration file jspell.cfg to replace "Numbered" by
  980.     "NoNumbered".
  981.  
  982.     The limit L on the length of the suggested words is 40, which is
  983.     the same as the maximum length for legitimate words. But when
  984.     there are more than 8 suggested words, then this limit L reduces
  985.     to 17 under the Numbered option and 19 under the NoNumbered
  986.     option.
  987.  
  988.     The third box in the lower right part of the screen shows menu
  989.     buttons.  Each menu button contains exactly one uppercase
  990.     letter, which is highlighted (or inverse-video'ed for Laptop
  991.     color option).  This capitalized letter is the command key for
  992.     that menu. More on this in the next section.
  993.  
  994.     The time necessary for jspell to prepare a suggested words list
  995.     is normally less than a fraction of a second for usual 386
  996.     machines.  But for longer words (with length, say > 10) and
  997.     slower machines, it might take several seconds.  Sometimes,
  998.     immediately after a word is spotted, you may realize that it's
  999.     not really a typo, and you are going to ignore it or add to a
  1000.     user dictionary. So, naturally, you don't want to waste time
  1001.     waiting for jspell to finish the preparation of the suggested
  1002.     words list. In this case, you can just go ahead and do the
  1003.     appropriate action by pressing a command key or clicking the
  1004.     left mouse button.  Then jspell will abort preparing the
  1005.     suggested words list and do the action immediately.
  1006.  
  1007.     Whenever a dialog box is displayed, waiting for a user action,
  1008.     pressing the ESC key or clicking the right mouse button has the
  1009.     same effect as choosing the "Cancel" option.
  1010.  
  1011.     At exit, jspell creates a backup file with the name <filename>.bak
  1012.     (assuming that the input file has filename <filename>.<ext>) if
  1013.     (and only if) the "BackUp" option is selected, which is
  1014.     set/unset by the 7th entry of the configuration file jspell.cfg.
  1015.     The backup file <filename>.bak is created in the same directory
  1016.     as the input file.
  1017.  
  1018.  
  1019.   II.3.2  Capitalization of words
  1020.  
  1021.     We define four types of words according to the capitalization
  1022.     as follows.  A word <word> has capitalization type:
  1023.  
  1024.       "no-cap" if no uppercase letter appears in <word>,
  1025.           (e.g., apple)
  1026.       "first-only-cap" if the first letter of <word> is the
  1027.           only uppercase letter appearing in <word>, (e.g., Berlin)
  1028.       "all-cap" if all letters of <word> are uppercase,
  1029.           (e.g., IBM)
  1030.       "oddly-cap" otherwise. (e.g., TeX)
  1031.  
  1032.     How jspell handles the capitalization is best explained
  1033.     through an example:
  1034.  
  1035.     ┌────────────────────┬──────────────────────┬──────────────────┐
  1036.     │ word in dictionary │ jspell recognizes    │  jspell spots    │
  1037.     ├────────────────────┼──────────────────────┼──────────────────┤
  1038.     │   apple            │ apple, Apple, APPLE  │  APple           │
  1039.     │   Berlin           │ Berlin, BERLIN       │  berlin, BerLin  │
  1040.     │   IBM              │ IBM                  │  ibm, Ibm, iBm   │
  1041.     │   TeX              │ TeX                  │  tex, Tex, TEX   │
  1042.     └────────────────────┴──────────────────────┴──────────────────┘
  1043.  
  1044.  
  1045.   II.3.3  Menu
  1046.  
  1047.     User action can be made by pressing a command key or clicking
  1048.     the left mouse button.  The location of the currently
  1049.     highlighted area, as well as the key pressed or mouse button
  1050.     clicked, affects the action. For instance, pressing the command
  1051.     key ENTER adds the spotted word <spotted.word> into the user
  1052.     dictionary <user.dic> if the menu button [Add to user.dic] is
  1053.     being highlighted at that moment, but replaces <spotted.word> by
  1054.     a suggested word <suggested.word> if the suggested word
  1055.     <suggested.word> is being highlighted. You can move the
  1056.     highlighted area by arrow keys.
  1057.  
  1058.     From now on,  "use the menu button <menubutton>" means "click
  1059.     the left mouse button on <menubutton> or press ENTER while
  1060.     <menubutton> is being highlighted".
  1061.  
  1062.     If you press a key that is not a command key or click a mouse
  1063.     button when the mouse location is irrelevant, then it will be
  1064.     silently ignored by jspell.
  1065.  
  1066.     Following are the list of actions that can be made by the user.
  1067.  
  1068.       Get help:  On-line help screen pops up if the command key
  1069.          F1 is pressed.  You can escape the help screen by
  1070.          hitting ESC or get the second level help screen by
  1071.          hitting F1 again. Clicking the right mouse button has
  1072.          the same effect as hitting ESC.
  1073.  
  1074.       Edit:  When the edit row is being highlighted, you can edit
  1075.          the spotted/highlighted word in the edit row.  You can type
  1076.          in any legal characters and special characters.  If you
  1077.          have a US-keyboard and wants to enter extended ASCII
  1078.          character, then type in the corresponding ASCII code using
  1079.          the numeric keys while holding down the Alt key: e.g., you
  1080.          may use Alt-129 for entering umlaut u.
  1081.             If you want to insert a space inside a spotted word,
  1082.          then use Shift-<space> instead of <space>. This is because
  1083.          <space> is a command key for [Ignore].
  1084.              You can toggle between the insert mode and the
  1085.          overstrike mode by hitting the INS key.  The cursor
  1086.          is a half-block in the insert mode and an underscore in the
  1087.          overstrike mode.
  1088.              The usual editing keys like LeftArrow, RightArrow,
  1089.          HOME, END, Backspace, DEL, Ctrl-Backspace, Ctrl-T work as
  1090.          expected. ESC key clears the edit row. If ESC is pressed
  1091.          while the edit row is empty, then it works as an [Ignore]
  1092.          key.
  1093.              You may move the cursor by clicking the left mouse
  1094.          button on the position you want. (This cursor movement by
  1095.          mouse clicking should work even when the edit row is not
  1096.          being highlighted.)
  1097.  
  1098.       Ignore:  You can ignore the currently spotted word by hitting
  1099.          Alt-I or <space>.  Alternatively, you may use the menu
  1100.          button [Ignore].
  1101.  
  1102.       Global ignore:  You can ignore the currently spotted word to
  1103.          the rest of the file by hitting Alt-G or Ctrl-<space>.
  1104.          Alternatively, you may use the menu button [iGnore all].
  1105.  
  1106.       Replace: Refer to (Section II.3.4).
  1107.  
  1108.       Global replace:  Refer to (Section II.3.4).
  1109.  
  1110.       Mark:  Sometimes you may not be sure whether the spotted word
  1111.          is misspelled or not, and you don't have a dictionary at
  1112.          hand.  In this case you can "mark" the word by hitting
  1113.          Alt-M.  Then the spotted word will be marked by appending
  1114.          "QQ" at the end.  Alternatively, you may use the menu
  1115.          button [Mark].  Later you can change this marked word
  1116.          appropriately using a text editor.
  1117.  
  1118.       Global mark:  You can mark the currently spotted word <word>
  1119.          and all the subsequent occurrences of <word> by pressing
  1120.          the key Alt-K.  Alternatively, you may use the menu button
  1121.          [marK all].
  1122.  
  1123.       Add the spotted word into the main user dictionary:
  1124.          Refer to (Section II.3.5).
  1125.  
  1126.       Add the spotted word into the file specific dictionary]
  1127.          Refer to (Section II.3.5).
  1128.  
  1129.       Undo:  You may undo your last action, which is always
  1130.          displayed at the bottom of the screen, by pressing Alt-U.
  1131.          Alternatively, you may use the menu button [Undo]. A window
  1132.          will pop-up asking you to choose one among the three
  1133.          options "Undo", "Cancel" or "Undo further", whose meanings
  1134.          should be obvious.  Up to 400 levels of undoing is allowed.
  1135.  
  1136.       Exit:  You may exit from jspell before finishing
  1137.          spell-checking the current input file by hitting Alt-X, or
  1138.          alternatively, by using the menu button [eXit].  A window
  1139.          will pop-up asking you to choose one among the three
  1140.          options:
  1141.  
  1142.            Yes        (save changes before exit), or
  1143.            No         (do not save changes and exit), or
  1144.            Cancel     (do not exit, and continue jspell).
  1145.  
  1146.          By "change" we mean any replacement of words and/or
  1147.          addition of words to user dictionaries (main user
  1148.          dictionary or file specific dictionary).
  1149.  
  1150.     Among these twelve possible user actions, some need more
  1151.     detailed explanations, which are given in the following two
  1152.     sections.
  1153.  
  1154.     When you are done with the last misspelled word in the input
  1155.     text file, jspell opens a dialog box asking you to choose "Exit"
  1156.     or "Cancel", thereby giving you a chance of undoing the last
  1157.     action. Also jspell shows some information about the session
  1158.     such as the number of words processed, number of words added to
  1159.     the main user dictionary etc.
  1160.  
  1161.  
  1162.   II.3.4  [Replace] and [rePlace all]
  1163.  
  1164.     There are various ways of replacing the spotted word <word> by a
  1165.     correctly spelled word.
  1166.  
  1167.     First, if you want to replace <word> by the word in the edit
  1168.     row, then you may do so, by
  1169.  
  1170.       (i) pressing ENTER or Alt-R  while the edit row is
  1171.           highlighted, or
  1172.       (ii) use the menu button [Replace].
  1173.  
  1174.     (If the word in the edit row is the same as the spotted word,
  1175.     then jspell actually [Ignore]s instead of [Replace]ing.)
  1176.  
  1177.     Second, if you want to replace <word> by one of the suggested
  1178.     words, then you may do so by one of the following three methods:
  1179.  
  1180.       (i) hitting the highlighted (or Alt'ed and highlighted)
  1181.           numeral in front of the wanted word, or
  1182.       (ii) highlight the wanted word and press ENTER or Alt-R or
  1183.           click on the menu button [Replace], or
  1184.       (iii) just click on the wanted word in the suggestion area.
  1185.  
  1186.     The menu [rePlace all] is just the global version of [Replace].
  1187.     Note note that global replacement by a suggested word can be
  1188.     done by clicking mouse on that word while pressing down the Ctrl
  1189.     key.
  1190.  
  1191.     Things get a little bit complicated if the "correct word" you
  1192.     want to replace is illegitimate or not in the dictionary.  In
  1193.     the first case jspell asks the user confirmation.  In the latter
  1194.     case, jspell opens a pop-up window asking you to choose one of
  1195.     the following:
  1196.  
  1197.       Add to "<main user dic>" and Replace, or
  1198.       Add to "<file specific dic>" and Replace, or
  1199.       Ignore and Replace, or
  1200.       Cancel.
  1201.  
  1202.     The meanings of these four options should be obvious.  Such a
  1203.     "composite action" can be undone by user's request, like any
  1204.     other actions, of course.
  1205.  
  1206.  
  1207.   II.3.5  Adding spotted word to user dictionaries
  1208.  
  1209.     When the user wants to add a new word to the dictionary, the
  1210.     user has the option of choosing the main user dictionary or the
  1211.     file specific user dictionary.  You may do these actions by the
  1212.     menu [Add to <main user dic>] or [add To <file specific> dic]
  1213.     whichever is appropriate.
  1214.  
  1215.     If the spotted word has capitalization type "first-only-cap" or
  1216.     "all-cap", then jspell asks the user to choose the actual
  1217.     capitalization type to be put into the dictionary.  Note that an
  1218.     "oddly-cap"ped word, as well as a "no-cap"ped word, is directly
  1219.     put into the dictionary without such a confirmation step.
  1220.  
  1221.     If a word with the capitalization type first-only-cap or all-cap
  1222.     is spotted and you want to add this word to a user dictionary
  1223.     (main user or file specific) without altering the capitalization
  1224.     type, then you probably don't want be bothered by the dialog box
  1225.     which asks you to choose the actual capitalization type.  In
  1226.     this case you may skip the confirmation step by doing the action
  1227.     (either by command key or by mouse click) while pressing down
  1228.     the Shift key. (Recall that the Shift key has something to do
  1229.     with the upper/lower case of letters.)
  1230.  
  1231.     If the main user dictionary is initially empty but some words
  1232.     are added in there during a jspell session, then a fresh main
  1233.     user dictionary is created in the jspell directory (assuming
  1234.     that the file/path-name is allowed by DOS). If the file specific
  1235.     dictionary is initially empty but some words are added in there
  1236.     during a jspell session, then a fresh file specific dictionary
  1237.     is created in the current directory (with a similar assumption
  1238.     on the file/path-name).
  1239.  
  1240.  
  1241.   II.3,6  Miscellanies
  1242.  
  1243.     One of the first things that jspell does at the beginning of a
  1244.     session is to check whether the input file is really an ASCII
  1245.     text file.  jspell does this ASCII-test by examining the first
  1246.     1024 bytes of the input file.  If the NULL character exists in
  1247.     this beginning part of the input file, then jspell exits with an
  1248.     appropriate error message.
  1249.  
  1250.     There are certain restrictions to the input file, say
  1251.     <filename>.  If <filename> is read-only (i.e., not rewritable),
  1252.     then jspell exits with the message
  1253.  
  1254.       "<filename>" is READ_ONLY
  1255.  
  1256.     This is because the changes made by jspell cannot be saved in
  1257.     the read-only file <filename>.  A similar test is done on
  1258.     the main user dictionary and the file specific user dictionary.
  1259.  
  1260.     When the backup option is set, and if the input file has
  1261.     extension ".bak", then there is no way to make any change to the
  1262.     input file and at the same time keep the backup copy of the
  1263.     original with the filename <filename>.bak.  In this situation,
  1264.     you'll be warned: that is, you'll have the option of disabling
  1265.     the backup option for the session or just abort at that moment.
  1266.  
  1267.     jspell refuses to work on a file whose filename extension is
  1268.     ".dic".
  1269.  
  1270.     jspell needs about 400K bytes of free memory.  The rest of the
  1271.     memory is used as input file buffer.   If the input file size is
  1272.     so large that the input file buffer gets full while running
  1273.     jspell, then the overspilt text is saved to the disk.  You can't
  1274.     undo an action made on this already-saved part of the text.  But
  1275.     even if the buffer gets full and some part of the text is saved
  1276.     to the disk, if you abort jspell by the menu [eXit] and choose
  1277.     not to save the changes made so far, then it'll work without any
  1278.     problem: i.e., the input file remains intact.
  1279.  
  1280.  
  1281.   II.4  Configuration files and command line options
  1282.  
  1283.     jspell uses two configuration files, jspell.cfg and jsptex.cfg.
  1284.     Both are plain ASCII text files that can be freely edited by any
  1285.     text editor. The configuration files should exist in the jspell
  1286.     directory. But the current working directory is first searched
  1287.     as usual.
  1288.  
  1289.     In each lines of these two configuration files, if a space
  1290.     character or the TeX comment character % is encountered then the
  1291.     rest of the line is ignored.  In particular, if a line starts
  1292.     with a space of %, then the whole line is ignored.
  1293.  
  1294.     If any illegitimate entry is found in a configuration file, then
  1295.     jspell exists with an error message showing where it has
  1296.     happened.  It should be stressed that the order of the entries
  1297.     in the configurations files is important.  Be careful not to
  1298.     mess this up.
  1299.  
  1300.     jsptex.cfg has been explained in detail in (Section II.2.3).
  1301.     Hence we'll only look at jspell.cfg in this section.  A typical
  1302.     jspell.cfg file is shown below:
  1303.  
  1304.       AT           %1.  keyboard (AT or XT)
  1305.       VGA          %2.  video card  (CGA,EGA,VGA or Hercules)
  1306.       Enhanced     %3.  color option (Standard, Enhanced, Monochrome
  1307.                                       or Laptop)
  1308.       10           %4.  (0-99) (pop-up window explosion speed,
  1309.       delaying interval)
  1310.       *.dic *.txt  %5.  dictionary filenames pattern
  1311.       MathIgnore   %6.  MathIgnore or MathNoIgnore
  1312.                         (math ignore in TeX)
  1313.       BackUp       %7.  BackUp or NoBackUp
  1314.       8            %8.  (1-16) TabSize
  1315.       Numbered     %9.  Numbered or NoNumbered (suggested word list)
  1316.       pNoIgnore    %10. pIgnore or pNoIgnore  ('%' ignore in TeX)
  1317.       2            %11. (2-9) Minimum word length
  1318.       base.dic     %12. default base dictionary
  1319.       user.dic     %13. default main user dictionary
  1320.  
  1321.     The first three entries have already been explained fully in
  1322.     (Section I.4).
  1323.  
  1324.     The fourth entry is the delay interval (in milliseconds) of the
  1325.     explosion speed of pop-up windows.  It must be an integer in
  1326.     between 0 and 99.  Smaller value results in faster explosion.
  1327.  
  1328.     The fifth entry is for dictman only, and hence will not be
  1329.     explained here.
  1330.  
  1331.     The sixth entry is used to set/unset the math ignore mode. It
  1332.     should be either MathIgnore or MathNoIgnore.  This has effect
  1333.     only when the TeX mode is used.
  1334.  
  1335.     The seventh entry is used to set/unset the backup mode.  It
  1336.     should be either BackUp or NoBackUp.  If the backup mode is set,
  1337.     then a jspell leaves a backup <filename>.bak of the original
  1338.     input file <filename>.<ext>.  Otherwise no backup file will be
  1339.     left.  This has no effect on dictman.
  1340.  
  1341.     The eighth entry is the tab size.  If the input text file
  1342.     contains the tab characters (ASCII code 9), then it is expanded
  1343.     to n spaces where n is the number specified by this entry.  We
  1344.     require 1 <= n <= 16. This has no effect on dictman.
  1345.  
  1346.     If the ninth entry is Numbered, then jspell displays a
  1347.     highlighted numeral in front of each suggest word. (The numeral
  1348.     can be used to choose the corresponding word to replace the
  1349.     spotted word.) In case the mouse is installed, then you might
  1350.     want not to display those numerals.  Replace Numbered to
  1351.     NoNumbered to this end.  This has no effect on dictman.
  1352.  
  1353.     The tenth entry is about the after-%-ignoring feature in TeX. It
  1354.     should be either "pIgnore" or "pNoIgnore".  This has effect only
  1355.     when the TeX-mode is used.  If you choose pIgnore, then jspell
  1356.     ignores everything in a line after the first encounter of a
  1357.     nonliteral %.  Choosing pNoIgnore disables this feature.
  1358.  
  1359.     The eleventh entry sets the minimum word length MinWordLen. Any
  1360.     sequence of characters with length less than this variable
  1361.     MinWordLen will not be considered as a word by jspell and
  1362.     dictman. MinWordLen must take value in between 2 and 9.
  1363.  
  1364.     The last two entries are the default names of the base
  1365.     dictionary and the main user dictionary (in this order).
  1366.  
  1367.     Many of the configuration variables above can be overridden by
  1368.     command line switches as follows. The default base dictionary
  1369.     name is overridden by the switch -bd:
  1370.  
  1371.       jspell -bd <base dictionary> ...
  1372.  
  1373.     The main user dictionary name is overridden by the switch -ud:
  1374.  
  1375.       jspell -ud <main user dictionary> ...
  1376.  
  1377.     MinWordLen is overridden by the switch -len:
  1378.  
  1379.       jspell -len n ...,
  1380.  
  1381.     where 2 <= n <= 9.
  1382.  
  1383.     Math ignore mode is overridden by the switch -math[+-]: -math
  1384.     (or equivalently -math+) sets the math ignore mode on and -math-
  1385.     sets the math ignore mode off.
  1386.  
  1387.     After-%-ignore mode is similarly overridden by the switch
  1388.     -percent[+-].
  1389.  
  1390.     There are two more switches available.  One is used to override
  1391.     the default file dictionary name.  If the input file name is
  1392.     <filename>.<ext>, then the default file dictionary name is
  1393.     <filename}.dic.  But you can override this by the switch -fd:
  1394.  
  1395.       jspell -fd <file dictionary> ...
  1396.  
  1397.     The other is used to override the TeX-mode, which is set on/off
  1398.     if the filename extension is/(is not) ".tex".  The switch -t[+-]
  1399.     is used to override this convention:
  1400.  
  1401.       jspell -t <filename>.<ext>
  1402.  
  1403.     to force TeX-mode on the input file <filename>.<ext> and
  1404.  
  1405.       jspell -t- <filename>.tex
  1406.  
  1407.     to force non-TeX-mode on the input file <filename>.tex.
  1408.     -t+ has the same effect as -t.
  1409.  
  1410.     The list of all these 7 switches available can be displayed by
  1411.     entering the command
  1412.  
  1413.       jspell
  1414.  
  1415.     with no command line argument, as explained in the Test drive
  1416.     section.
  1417.  
  1418.     More than one switches can be used in any order: for instance,
  1419.     the command
  1420.  
  1421.       jspell -t -bd german.dic -len 3 text.1
  1422.  
  1423.     or equivalently,
  1424.  
  1425.       jspell -bd german.dic -len 3 -t text.1
  1426.  
  1427.     spell-checks the input file text.1 with TeX-mode on, MinWordLen
  1428.     = 3 and base dictionary = german.dic.
  1429.  
  1430.  
  1431.   II.5  Usage tips
  1432.  
  1433.     Each user dictionary can hold fairly large number of words---the
  1434.     limit is 5,000.  But it's a good idea to use user dictionaries
  1435.     only for technical words (used in various disciplines of science
  1436.     such as mathematics, medicine, psychology etc.) or personal
  1437.     words (like your friend's names). Words with general nature
  1438.     should be merged to a base dictionary using the accompanying
  1439.     dictionary manager dictman.  This is because there is a
  1440.     substantial difference in the speeds of loading base
  1441.     dictionaries and user dictionaries---base dictionaries are
  1442.     loaded into computer memory much faster.  (This has been
  1443.     discussed in (Section II.1.2).  Note that once the dictionaries
  1444.     are loaded into computer memory, there is no speed penalty for
  1445.     having lots of words from user dictionaries.) Also you can get
  1446.     significant space savings, both in disk and in the computer
  1447.     memory, by this dictionary merging.
  1448.  
  1449.     The rest of this section is devoted for TeX-mode.
  1450.  
  1451.     When spell-checking a TeX document (with lots of mathematics),
  1452.     it's in general better to run TeX before jspell.  For instance,
  1453.     if you ended a math mode started by \begin{eqnarray} with
  1454.     \end{eqnarray*} by mistake, then jspell will ignore all the rest
  1455.     of the file starting from \begin{eqnarray}.  Such a pitfall can
  1456.     be avoided by spell-checking only TeX-correct files.
  1457.  
  1458.     Another hard-to-catch pitfall may occur when you use the TeX
  1459.     commands  in the verbatim mode.  This manual uses tons of such
  1460.     constructions.
  1461.  
  1462.     Sometimes we need to use a misspelled word in a document.  For
  1463.     instance, this manual used the misspelled word "teh" several
  1464.     times.  But it is not a good idea to put this word "teh" in
  1465.     the file dictionary because that would let genuine typos of
  1466.     "teh" unspotted by jspell.  One way to overcome such a
  1467.     problem is to use a dummy TeX-command with arity 1: that is,
  1468.     define a command \dummy by
  1469.  
  1470.       \newcommand{\dummy}[1]{#1}
  1471.  
  1472.     Then put a line
  1473.  
  1474.       1dummy
  1475.  
  1476.     in the TeX configuration file jsptex.cfg.  Then whenever a
  1477.     misspelled word, say "teh", needs to be used in the document,
  1478.     use \dummy{teh}.  This command \dummy can be conveniently used
  1479.     in ignoring parts of the input text in other situations---for
  1480.     instance, a program listing in verbatim mode.
  1481.  
  1482.     Even if it is TeX-correct, there is some possibility that jspell
  1483.     is fooled: for instance, TeX doesn't complain anything (and
  1484.     produces the correct .dvi file) if you begin a math mode by $
  1485.     and end it by \).  But jspell is less tolerant on this kind of
  1486.     asymmetry.  Other ways of fooling jspell by use of the TeX
  1487.     comment character % has been discussed already in (Section II.2.5).
  1488. Chapter III.  User's guide for dictman ---------------------------
  1489.  
  1490.   III.1.  Introduction
  1491.  
  1492.     Entering the command
  1493.  
  1494.       dictman ?
  1495.  
  1496.     at the DOS prompt displays the following on the screen:
  1497.  
  1498.       Usage: dictman [-options...]
  1499.                option = -len n    (2 <= n <= 9)
  1500.                         -t[+-]
  1501.                         -math[+-]
  1502.                         -percent[+-]
  1503.  
  1504.     Note that dictman does not accept any input file as a command
  1505.     line argument.
  1506.  
  1507.     Each command line switch has the same function as in jspell:
  1508.     i.e., -len n is used to set the minimum value 2 <= n <= 9 for
  1509.     the legitimate word length, -t[+-] is to force TeX/non-TeX-mode,
  1510.     -math[+-] to force math-ignore/math-no-ignore mode and
  1511.     -percent[+-] to force after-%-ignore/ after-%-no-ignore mode.
  1512.     This should be enough explanation on the command line switches
  1513.     for dictman.
  1514.  
  1515.     An important difference between dictman and jspell exists in the
  1516.     way the TeX-mode is selected (in case it is not forced by the
  1517.     command line switch -t[+-]).  In jspell the default mode was
  1518.     determined by the extension of the input file name---the
  1519.     TeX-mode is selected if the extension is .tex and not selected
  1520.     otherwise.  In dictman, the TeX-mode is always assumed unless
  1521.     the contrary is forced by the switch -t-. This is because the
  1522.     name of a dictionary file containing words using TeX constructs,
  1523.     such as \", \oe etc., has no compelling reason to have the
  1524.     extension .tex.  Moreover, even if the non-TeX-mode is selected
  1525.     by the switch -t-, it has effect only on the menu item
  1526.     [UserDic][Read].
  1527.  
  1528.     dictman shares the two configuration files jspell.cfg, jsptex.cfg
  1529.     and the help message file jspell.hlp with jspell.  As was
  1530.     explained before, some of those configuration variables have no
  1531.     effect on dictman, and conversely, one of the variables, namely
  1532.     the fifth one, has effect on dictman only.  We will be back to
  1533.     this topic in (Section III.3).
  1534.  
  1535.     dictman provides us with pull-down menu and context sensitive
  1536.     help system.  Left mouse button is normally used in clicking and
  1537.     dragging while right mouse button is normally used for
  1538.     canceling.  Arrow keys and the usual command keys such as HOME,
  1539.     END, ENTER, ESC behave as expected.  Help key is F1 of course.
  1540.  
  1541.     If you need help on a particular menu item, then highlight that
  1542.     item and hit F1.  If you use mouse, then hit F1 while the (left)
  1543.     button is being pressed on the menu item.
  1544.  
  1545.     Throughout this manual, a menu item of dictman will be denoted in
  1546.     the following format:
  1547.  
  1548.       [first level][second level]
  1549.  
  1550.     For example, [File][Clear Screen] menu, which is used to clear
  1551.     the main display area, can be shown by pulling down the first
  1552.     level menu item [File].
  1553.  
  1554.     The main display area saves the previous 200 lines---you can
  1555.     scroll back and forth using the keys Ctrl-UpArrow,
  1556.     Ctrl-DownArrow, PageUp, PageDown, Ctrl-PageUp and Ctrl-PageDown.
  1557.     (If you use XT-keyboard, then use Shift-UpArrow and
  1558.     Shift-DownArrow instead of Ctrl-UpArrow and Ctrl-DownArrow
  1559.     respectively.)
  1560.  
  1561.     Regular expressions are used frequently in dictman. Our
  1562.     convention on regular expressions are as follows:
  1563.  
  1564.     * matches any string,
  1565.     ? matches any single letter,
  1566.     [<string>] matches a single letter as in the
  1567.         following examples:
  1568.         [arD] matches `a', `r' and `D'.
  1569.         [p-s] matches `p', `q', `r' and `s'.
  1570.         [3-5p-sXQa] matches `3', `4', `5' `p', `q', `r', `s',
  1571.                             `X', `Q' and `a'.
  1572.     \ is the escape character: for instance, the regular expression
  1573.     \*[a-c\-]?\\ matches any string of length 4 that starts with
  1574.     `*', ends with `\' and has `a', `b', `c' or `-' as the 2nd
  1575.     character.
  1576.  
  1577.     Note that we use above convention for filenames too.  This is a
  1578.     little bit different from the usual DOS file name wild card
  1579.     convention.  For instance the regular expression `*' matches all
  1580.     files in dictman, but it only matches files with no extension in
  1581.     usual DOS environments.
  1582.  
  1583.  
  1584.   III.2 Running dictman, the dictionary manager
  1585.  
  1586.     In this section, all the menu items are explained.  Some of the
  1587.     more important items are briefly explained here and then
  1588.     revisited (with details) in later sections.
  1589.  
  1590.     For the basic (but technical) definitions of words and
  1591.     dictionaries, the readers are referred to (Section II.1).
  1592.  
  1593.     When dictman starts, you will see five first level menu items:
  1594.     [File], [BaseDic], [UserDic], [Utilities] and [Help=F1].  We
  1595.     look at each of these five in the following subsections.
  1596.  
  1597.   III.2.1. [File]  menus
  1598.  
  1599.     Under this menu File], there are 4 second level menu items:
  1600.     [Directory], [Clear Screen], [Save Screen] and [Exit=Alt-X].
  1601.     These are the utilities related to files or the main display
  1602.     area.
  1603.  
  1604.     [Directory]  This menu item displays the directory listing of
  1605.       files x such that
  1606.         (i) the filename of x matches the current dictionary name
  1607.             pattern, and
  1608.         (ii) x exists in the current directory or in the jspell
  1609.             directory.
  1610.       You'll get prompted to
  1611.       enter the dictionary name pattern in a dialog box.  The default
  1612.       pattern is given in the configuration file jspell.cfg as the 5th
  1613.       entry.  More than one regular expressions separated by spaces are
  1614.       allowed in this pattern.
  1615.  
  1616.     [Clear Screen]  Clears the main display area.
  1617.  
  1618.     [Save Screen]  Saves the current content of the main display
  1619.       area to a file "snapshot.0".  If snapshot.<n> exists already,
  1620.       then it is saved as snapshot.<n+1>, where n = 0, ... 8.   If
  1621.       you execute this menu item when n reached 9, then it is
  1622.       written over snapshot.0 with a warning message.
  1623.  
  1624.     [Exit=Alt-X]  Exits dictman.  Asks whether to save any change
  1625.       made during the session.
  1626.  
  1627.  
  1628.   III.2.2.  [BaseDic] menus
  1629.  
  1630.     Under this menu [BaseDic], there are 10 second level menu items:
  1631.     [Load], [Save], [Insert a word], [Delete a word], [Delete
  1632.     Words], [Count], [Find], [Clear], [Optimize] and [Expand].
  1633.     These are the utilities related to base dictionaries.
  1634.  
  1635.       [Load]  Loads a base dictionary into the computer memory.
  1636.         Current content of the combined base/user dictionary in the
  1637.         memory is erased. You are prompted to enter the filename.
  1638.         The default filename is given in the configuration file
  1639.         jspell.cfg as the 12th entry.  The default directory
  1640.         conforms to the directory searching rule as explained in
  1641.         (Section II.1.3).  Gives warning if the dictionary file is
  1642.         read-only.
  1643.  
  1644.       [Save]  Saves the current base dictionary in the memory to the
  1645.         disk.  You'll get prompted to enter the file name.  If the
  1646.         dictionary file is read-only, then gives warning and aborts
  1647.         the save action.
  1648.  
  1649.       [Insert a word]  Inserts a word to the base dictionary. You'll
  1650.         get prompted to enter the word.  The TeX-mode is always
  1651.         assumed.
  1652.  
  1653.       [Delete a word]  Deletes a single word from the base
  1654.         dictionary. You'll get prompted to enter the word.  The
  1655.         TeX-mode is always assumed.
  1656.  
  1657.       [Delete Words]  Deletes all words in a file <filename> from
  1658.         the base dictionary.  You'll get prompted to enter the
  1659.         <filename>.  The file <filename> must contain one word per
  1660.         each line, because only the first legitimate word in a line
  1661.         is read. The user dictionary need be empty to execute this
  1662.         menu item. The TeX-mode is always assumed.
  1663.  
  1664.       [Count] Counts the number of words in the base dictionary that
  1665.         match the input <pattern>.  You'll get prompted to enter a
  1666.         regular expression for this <pattern>.
  1667.  
  1668.       [Find]  Finds (and displays) the words in the base dictionary
  1669.         that match the input <pattern>.  You'll get prompted to
  1670.         enter a regular expression for this <pattern>.  Up to 80
  1671.         words can be displayed.
  1672.  
  1673.       [Clear] Clears the base dictionary from the computer memory.
  1674.  
  1675.       [Optimize]  Using common prefix/suffixes, optimizes the base
  1676.         dictionary. For instance, "wanted" is absorbed to "want"
  1677.         (assuming that both words exists).  Substantial space saving
  1678.         is obtained by doing this. (For English only in the current
  1679.         version.)  The user dictionary need be empty to execute this
  1680.         menu item.
  1681.  
  1682.       [Expand]  Write the entire content of the base dictionary in
  1683.         the computer memory to a text file, one word per each line,
  1684.         sorted alphabetically.  You'll get prompted to enter the
  1685.         file name.
  1686.  
  1687.  
  1688.   III.2.3.  [UserDic] menus
  1689.  
  1690.     Under this menu [UserDic], there are 7 second level menu items:
  1691.     [Read], [Save], [Count], [Find], [Clear] and [Merge to BaseDic].
  1692.     These are the utilities related to user dictionaries.
  1693.  
  1694.     [Read]  Reads a text file and inserts all new legitimate words
  1695.       in it, that are NOT already in the combined base/user
  1696.       dictionary, into the user dictionary.  Existing data are not
  1697.       cleared.  You'll get prompted to enter the file name. Warns if
  1698.       the file is read-only.  The TeX-mode is assumed unless the
  1699.       contrary is forced by the command line switch -t-. Since a
  1700.       user dictionary can hold at most 5,000 words, all words in the
  1701.       user dictionary are automatically moved to the base dictionary
  1702.       each time the user dictionary gets full (i.e., reaches the
  1703.       5,000 word limit).  So, for instance, if 11,200 words are read
  1704.       from a text file using this menu item, then 10,000 words will
  1705.       be read into the base dictionary and the remaining 1,200 words
  1706.       will be read into the user dictionary .
  1707.  
  1708.     [Save]  Saves the user dictionary in the computer memory to a
  1709.       disk file. You'll get prompted to enter the file name.  If the
  1710.       file is read-only, then gives warning and aborts the save
  1711.       action.
  1712.  
  1713.     [Count]  Counts the number of words in the user dictionary that
  1714.        match the input <pattern>.  You'll get prompted to enter a
  1715.        regular expression for this <pattern>.
  1716.  
  1717.     [Find]  Finds (and displays) the words in the user dictionary
  1718.        that match the input <pattern>.  You'll get prompted to enter
  1719.        a regular expression for this <pattern>. Up to 80 words can
  1720.        be displayed.
  1721.  
  1722.     [Clear]  Clears the user dictionary from the computer memory.
  1723.  
  1724.     [Merge to BaseDic]  Merges (i.e., moves) all words from the user
  1725.        dictionary to the base dictionary.  Normally, you should
  1726.        execute  the menu item [BaseDic][Optimize] right after this.
  1727.  
  1728.  
  1729.   III.2.4.  [Utilities] menus
  1730.  
  1731.     Under this menu [Utilities], there are 5 second level menu
  1732.     items:  [Legal Characters], [Legitimacy], [Count], [Find] and
  1733.     [Clear].  These are the utilities related to the combined
  1734.     base/user dictionaries.
  1735.  
  1736.     [Legal Characters]  Prints all the characters (legal and/or
  1737.        special), with their ASCII codes, that can be used in words.
  1738.  
  1739.     [Legitimacy]  Tests whether a word is legitimate.  You'll get
  1740.         prompted to enter the word.  The TeX-mode is always assumed.
  1741.  
  1742.     [Count]  Counts the number of words in the combined base/user
  1743.         dictionary that match the input <pattern>.  You'll get
  1744.         prompted to enter a regular expression for this <pattern>.
  1745.  
  1746.     [Find]  Finds (and displays) the words in the combined base/user
  1747.        dictionary that match the input <pattern>. You'll get
  1748.        prompted to enter a regular expression for this <pattern>.
  1749.        Up to 80 words can be displayed.
  1750.  
  1751.     [Clear]  Clears the combined base/user dictionary from the
  1752.       computer memory.
  1753.  
  1754.  
  1755.   III.2.5.  [Help=F1] menus
  1756.  
  1757.     Under this menu [Help=F1], there are 5 second level menu items:
  1758.     [About], [Getting Help], [Keyboard & Mouse], [Configuration] and
  1759.     [Manual].  These are the on-line help messages of dictman.
  1760.  
  1761.     [About]  About dictman.
  1762.  
  1763.     [Getting Help]  How to get on-line help.
  1764.  
  1765.     [Keyboard & Mouse]  Explains the basic usage of the keyboard and
  1766.        the mouse in dictman.
  1767.  
  1768.     [Configuration]  Some information on hardware compatibility and
  1769.        configuration.
  1770.  
  1771.     [Manual] A short manual of dictman.
  1772.  
  1773.  
  1774.   III.3.  Dictionary maintenance
  1775.  
  1776.   III.3.1.  Merging user dictionary to base dictionary
  1777.  
  1778.     Although each user dictionary can hold up to 5,000 words, it's a
  1779.     good idea to keep the size of a user dictionary far less than
  1780.     this limit.  The reason is two-fold: first, dictionary loading
  1781.     of base dictionary is several times faster than that of user
  1782.     dictionary. Second, base dictionary is more space efficient than
  1783.     user dictionary. This is due to the inherent structural
  1784.     difference between the two types of dictionaries.  Base
  1785.     dictionary is built to be efficient in space and time.  User
  1786.     dictionary is built for easy maintenance---it can be managed by
  1787.     direct editing by any text editor.
  1788.  
  1789.     When jspell is used over a network, several users may share the
  1790.     same base dictionary.  So it may not be always the best to merge
  1791.     all words in all user dictionaries to the base dictionary.  The
  1792.     rule of thumb is that words with general nature should be merged
  1793.     to the base dictionary and words with personal or special nature
  1794.     (e.g., friends' names or technical jargons) should be kept in
  1795.     user dictionaries.
  1796.  
  1797.     Normally, only one base dictionary should be sufficient for a
  1798.     language.  For instance, american.dic, british.dic, german.dic,
  1799.     french.dic etc.
  1800.  
  1801.     ** An example of dictionary merging procedure:  Suppose that we
  1802.     want to merge all words of the main user dictionary user.dic to
  1803.     the base dictionary base.dic.  In any directory, start dictman
  1804.     by the command
  1805.  
  1806.       dictman
  1807.  
  1808.     Load the base dictionary by the menu [BaseDic][Load]. Then read
  1809.     the user dictionary by the menu [UserDic][Read].  Be careful to
  1810.     check the full pathname of the dictionary files. Merge the user
  1811.     dictionary to the base dictionary by the menu [UserDic][Merge to
  1812.     BaseDic].  Now the user dictionary will be empty because all
  1813.     words have been moved to the base dictionary. Then optimize the
  1814.     base dictionary by the menu [BaseDic][Optimize].
  1815.  
  1816.     Finally save the base dictionary by the menu [BaseDic][Save]. At
  1817.     this point the user dictionary file still exists in the disk.
  1818.     Delete the user dictionary by a DOS command (after you exit from
  1819.     dictman). (If you want to keep the old user dictionary file,
  1820.     then rename user.dic to another, say userold.dic).
  1821.  
  1822.  
  1823.   III.3.2  Deleting words from a base dictionary
  1824.  
  1825.     You may want to delete a word from a base dictionary for various
  1826.     reasons.  The obvious situation is that you found a misspelled
  1827.     word in your base dictionary.  No matter how you are cautious,
  1828.     some words in most user dictionaries (or base dictionaries after
  1829.     merging) are misspelled.  (Typical public domain word lists
  1830.     contain several misspelled words in every thousand words.  Spell
  1831.     checkers included in leading commercial word processors have
  1832.     fewer misspelled words but not perfect.)
  1833.  
  1834.     Also it may happen that you want to delete a correct-spelled
  1835.     word from your base dictionary.  "abut" and "manger" are
  1836.     examples of such words.  They are more likely to be typos of
  1837.     "about" and "manager" respectively.
  1838.  
  1839.     There are two menu items in dictman that are used in deleting
  1840.     words.  One is [BaseDic][Delete a word] and the other is
  1841.     [BaseDic][Delete Words].  Using the first, you can delete a word
  1842.     that you type in at the prompt.  Using the second, you can
  1843.     delete a list of words saved in a text file, one word per line.
  1844.     If, for some reason, you have a to-be-deleted-words file that
  1845.     contains more than one word per line, then use the menus
  1846.     [UserDic][Read] followed by [UserDic][Save] to obtain a
  1847.     one-word-per-line text file.  (Incidentally, the resulting file
  1848.     will be alphabetically sorted.)
  1849.  
  1850.  
  1851.   III.3.3.  Building up your own base dictionary
  1852.  
  1853.     This section is about building up a base dictionary starting
  1854.     from scratch.  You will definitely need to do this if you use
  1855.     any language other than English (in fact, American English).
  1856.     Normally you will need two steps in doing this:
  1857.  
  1858.     (i) Prepare a word list.
  1859.     (ii) Build a base dictionary from the word list.
  1860.  
  1861.     The easiest way to prepare a word list is to use an already
  1862.     compiled list of words.  It should be not too difficult to
  1863.     obtain a public domain word list by anonymous FTP.  The drawback
  1864.     of this method is that such a list usually contains a lot of
  1865.     misspelled words.
  1866.  
  1867.     A harder method is to type each and every word appearing in a
  1868.     well-known dictionary yourself.  Not recommended---very time
  1869.     consuming and unreliable (i.e., lots of typos).
  1870.  
  1871.     Here is a lazy way: first prepare a short list of very
  1872.     frequently used words.  (In English, words such as "the", "of",
  1873.     "to", "this", "that", "be", "is", "are", "go", "come" ... may be
  1874.     used.) You build a small base dictionary consisting of these
  1875.     words as explained in (Section III.3.1).  Then you just do
  1876.     spell-checking using this tiny base dictionary, collecting new
  1877.     words in your main user dictionary each time you use jspell.
  1878.     When the main user dictionary gets large, say > 500 words, then
  1879.     merge it to the base dictionary.
  1880.  
  1881.     Since an ordinary person uses less than 3,000 words excluding
  1882.     technical words in his/her specialization, your base dictionary
  1883.     will soon get stabilized (i.e., no fuss of adding too many words
  1884.     in a single spell-check session).  (The number of words in the
  1885.     King James Version Bible is less than 13,000 despite the fact
  1886.     that it contains so many geographical and personal names.)
  1887.  
  1888.     If you are going to spell-check files that are prepared by
  1889.     yourself only, then this lazy method is not bad. You will have
  1890.     the advantage of having a compact (and hence fast loading)
  1891.     dictionary.  So this method is recommended for users of old
  1892.     XT-computers.
  1893.  
  1894.     Another good method is to use other available spell checkers.
  1895.     You first grab tons of text files. (Well, 10 Meg should be
  1896.     sufficient. Other than your own documents, Usenet is an
  1897.     excellent source of such text files in your specialization
  1898.     field.)  Using the method in (Section III.3.1), you build a base
  1899.     dictionary, which is very likely to contain lots of misspelled
  1900.     words.  Then get an ASCII text file, say <mywords> consisting of
  1901.     the words in the base dictionary using the menu [BaseDic][Expand].
  1902.     (The reason why we are not using user dictionary instead is
  1903.     because of the limit of 5,000 words for user dictionaries.) Then
  1904.     spell-check <mywords> using your spell-checker---noninteractive
  1905.     one is just fine.  Be sure to use a reliable spell-checker---
  1906.     some of them contain too many misspelled words (UNIX "spell" is
  1907.     one such notorious example. "ispell" is better.)   To increase
  1908.     the reliability, use several different spell checkers. After you
  1909.     have obtained a word list in this way, you can build the base
  1910.     dictionary with decent reliability.
  1911.  
  1912.     Don't be ambitious to build a large dictionary---because it will
  1913.     be tedious, unimaginative, time consuming, and (most importantly)
  1914.     unnecessary.
  1915. Appendix A.  Networked mode
  1916.  
  1917.     Let's call the directory in which jspell.exe resides the "jspell
  1918.     executable directory", and denote it by DIR_EXE. jspell runs in
  1919.     the networked mode if a file named "network" exists in the
  1920.     jspell executable directory DIR_EXE. Otherwise jspell runs in
  1921.     the single user mode.  The content of the file "network" does not
  1922.     matter.
  1923.  
  1924.     In the networked mode, we use a directory called the "jspell
  1925.     configuration directory", which is denoted by DIR_CFG. Normally,
  1926.     this jspell configuration directory DIR_CFG is defined by the
  1927.     environment variable JSPELL_DIR.  For instance, if you want the
  1928.     jspell configuration directory to be C:\MYDIC, then
  1929.  
  1930.       set JSPELL_DIR=C:\MYDIC
  1931.  
  1932.     command should be executed prior to jspell.  (Normally, this
  1933.     should be done at booting time by autoexec.bat.) In case the
  1934.     environment variable JSPELL_DIR is not defined, then jspell uses
  1935.     the root directory of the current drive as the default jspell
  1936.     configuration directory.
  1937.  
  1938.     jspell.cfg, jsptex.cfg and base.dic are first searched in the
  1939.     current directory, and then in DIR_CFG. So each user can set
  1940.     his/her own configuration by putting personal configuration
  1941.     files jspell.cfg and jsptex.cfg in the directory DIR_CFG. If
  1942.     jspell fails to find jspell.cfg, then it'll use the default file
  1943.     jspell.cfg in DIR_EXE.  The same is true for jsptex.cfg and
  1944.     base.dic.
  1945.  
  1946.     The main user dictionary is searched in the current directory
  1947.     and then in DIR_CFG but NOT in DIR_EXE.  It's o.k. not to have
  1948.     the main user dictionary in which case it is simply treated as
  1949.     empty, and a fresh main user dictionary will be created in
  1950.     DIR_CFG if a word is put there during a jspell session.
  1951.  
  1952.     File specific user dictionary search rule is the same as that of
  1953.     the main user dictionary except that the fresh dictionary is
  1954.     created (if not already exist) in the current directory instead
  1955.     of DIR_CFG.
  1956.  
  1957.     Additional user dictionary search rule is the same as that of
  1958.     the base dictionary.
  1959. Appendix B.  Frequently Asked Questions
  1960.  
  1961.     Q1.  Sometimes my computer hangs while loading the base dictionary.
  1962.  
  1963.     Ans. Some of your utilities, especially TSR's, may be buggy. For
  1964.       instance, the combination of the expanded memory manager
  1965.       "emm4j.sys" supplied in DOS4.0 and the popular disk-cache
  1966.       utility "superpck" will cause such a problem.
  1967.  
  1968.  
  1969.     Q2.  What's the limitation of jspell?
  1970.  
  1971.     Ans. No limit on input file length.  (Some limitation related to
  1972.       [Undo] may exist as explained at the end of (Section II.3.6).)
  1973.       Each line in the input file should have length <= 512
  1974.       (excluding the end of line character). The length of filenames
  1975.       (including path) is limited by 80. Foreign language base
  1976.       dictionary cannot be big due to the lack of support of
  1977.       prefix/suffix. (I have a report saying that 23,000 German word
  1978.       base dictionary is o.k. but 27,000 words cause insufficient
  1979.       memory error.)  This will be improved in the future versions.
  1980.  
  1981.  
  1982.     Q3.  I don't like the Enhanced color scheme of jspell.
  1983.  
  1984.     Ans.  You can switch to the Standard color scheme (or to the
  1985.       Monochrome or Laptop color scheme) by modifying the third line
  1986.       of the configuration file jspell.cfg appropriately.
  1987.  
  1988.  
  1989.     Q4.  What's the plan of improving jspell in the future
  1990.      versions?
  1991.  
  1992.     o  Dynamic (i.e., user customizable) prefix/suffix.  (Then jspell
  1993.        can claim to be truly international spell-checker.)
  1994.  
  1995.     o  Foreign dictionaries (German, French, Spanish, Portuguese,
  1996.        Italian ...) and British dictionary.
  1997.  
  1998.     o  Support of german.sty (and other <language>.sty if exists).
  1999.  
  2000.     o  Treatment of capitalization of umlauted characters.
  2001.  
  2002.     o  Some editing capability not limited to the highlighted area.
  2003.  
  2004.     o  Better treatment of hyphenated words in dictionary.  (For
  2005.        instance,  a hyphenated word should be in dictionary when all
  2006.        the hyphenation commands \- are stripped off.)
  2007.  
  2008.     o  Allow words to contain digits[0-9], period[.], dash[-] and
  2009.        space[ ].
  2010.  
  2011.     o  Support of 80x50 mode, 132x50 mode etc.
  2012.  
  2013.     o  jspell386 and/or jspell OS/2.  This will not only increase
  2014.        the speed and dictionary size but also enables the
  2015.        implementation of sophisticated data structures of word list
  2016.        that will result in more intelligent word suggestion.
  2017.  
  2018.     o  Treatment of hyphenated words in input files (across two
  2019.        lines).
  2020.  
  2021.     o  TSR will be very useful in writing short messages (e.g.,
  2022.        email message). Since jspell has no way of knowing how the
  2023.        text is stored in the memory under the editor in use, it'll
  2024.        read the text from the screen (i.e., video memory).
  2025.  
  2026.        For instance we could implement the following: if you move
  2027.        the cursor inside a word (whose spelling is doubtful) and hit
  2028.        the hot-key, then jspell opens a pop-up window indicating
  2029.        whether the word is correctly spelled and shows the suggested
  2030.        word list in case the word is found to be misspelled.
  2031.  
  2032.     o  The ability to load input file(s) within jspell. (Open a
  2033.        window of file lists from which the user can choose one by
  2034.        clicking mouse or something.)
  2035.  
  2036.     o  Detection of repeated words: e.g., "the the", "of of" etc.
  2037.  
  2038.     o  Lookup option:
  2039.  
  2040.          jspell -lookup <word>
  2041.  
  2042.        tells whether <word> is in the dictionary and also finds all
  2043.        close words.
  2044.  
  2045.  
  2046.     Q5. What constitutes the "low-cost upgrade"?
  2047.  
  2048.     ┌───────────────────┬──────────────────────────────────────┐
  2049.     │                   │                Charges               │
  2050.     │                   ├─────────┬──────────┬─────────────────┤
  2051.     │ Upgrade           │  Code   │ Diskette │ Diskette/Manual │
  2052.     ├───────────────────┼─────────┼──────────┼─────────────────┤
  2053.     │ Bug fix           │  $0.00  │  $2.00   │                 │
  2054.     ├───────────────────┼─────────┼──────────┼─────────────────┤
  2055.     │ Real Improvement  │  $3.00  │  $5.00   │      $12.00     │
  2056.     └───────────────────┴─────────┴──────────┴─────────────────┘
  2057. Appendix C.  History
  2058.  
  2059.  
  2060.     *** Version 2.0 (Nov.15, 1993) ***
  2061.  
  2062.     Released as a shareware.
  2063.  
  2064.       o  Complete documentation
  2065.       o  Streamlined base.dic (39,000+ words).  More than a hundred
  2066.          misspelled words have been deleted.
  2067.       o  Consistent directory searching rule.
  2068.       o  Configurable default base dictionary name and main user
  2069.          dictionary name in jspell.cfg.
  2070.       o  More command line options in jspell and dictman.
  2071.       o  Bug fix:
  2072.          (i) During scrolling a help screen of dictman,
  2073.              some garbage could appear occasionally.
  2074.          (ii) jsptex.cfg had no effect on dictman.
  2075.          (iii) Couldn't suggest "Thsi" ==> "This".
  2076.  
  2077.  
  2078.     *** Version 1.99-beta (Oct.18, 1993) ***
  2079.  
  2080.     Released only to a VERY small number of beta testers.
  2081.  
  2082.       o  Network support.
  2083.       o  The limit on the length of suggested words is increased
  2084.          from 17 to 40.
  2085.       o  TeX constructs \begin{table}[htpb] and \begin{figure}[htpb]
  2086.          are correctly handled.
  2087.       o  Some minor improvements in dictman.
  2088.  
  2089.  
  2090.     *** Version 1.84-beta (Oct.11, 1993) ***
  2091.  
  2092.    Not released.
  2093.  
  2094.       o  Global ignore is now done by Alt-G and/or [iGnore all]
  2095.          button. Similar changes to [rePlace all] and [marK all].
  2096.       o  Digits at the left of suggested words are highlighted to
  2097.          indicate that they are command keys.
  2098.       o  If a command key (like <space> for [Ignore]) is pressed
  2099.          during the dictionary look-up process for suggesting words,
  2100.          then the action is immediately taken (i.e.,  without
  2101.          completing the preparation of the suggested word list).
  2102.       o  Laptop color option added. (B/W with no bright white)
  2103.       o  Shift-Alt-A and Shift-Alt-T enter word to dictionary
  2104.          without asking capitalization.  The same is true for
  2105.          Shift-click.
  2106.       o  Bug fix:
  2107.          (i) Math-ignore mode related bugs.
  2108.          (ii) If the input file size is in between 1025 bytes and
  2109.              2048 bytes, and if Alt-X is hit when more than 1024
  2110.              bytes are done, then the output file may be messed up
  2111.              at the tail part.
  2112.          (iii) dictman [UserDic][Read] menu couldn't handle some TeX
  2113.              constructions including the hyphenation command \-.
  2114.          (iv) If the input filename is user.<ext>, then file
  2115.              dictionary get's the name user.dic}---thus filename
  2116.              collision.
  2117.          (v) dictman [UserDic][Read] menu hangs the computer if
  2118.              applied to large (> 1M bytes) files.
  2119.  
  2120.  
  2121.     *** Version 1.81beta (Oct. 1, 1993) ***
  2122.  
  2123.     Released only to a small number of beta testers.
  2124.  
  2125.       o  Customizable list of TeX commands for ignoring the
  2126.          subsequent words.
  2127.       o  Improved dictman in initial building up of base
  2128.          dictionaries. (The input word list file can contain more
  2129.          than 5,000 words.)
  2130.       o  Command line option of choosing base dictionary and/or file
  2131.          dictionary added.
  2132.       o  The TeX hyphenation command \- is now considered as a
  2133.          legitimate subword.
  2134.       o  The command key letters in the menu buttons are highlighted.
  2135.       o  Combined the help files jspell.hlp and dictman.hlp.
  2136.       o  Some more little improvements.
  2137.       o  Bug fix:
  2138.          (i) Memory related bugs in multilevel undoing of (global)
  2139.              replacement actions.
  2140.          (ii) Erratic behavior in math ignore mode.
  2141.          (iii) NoBackUp option doesn't work as expected.
  2142.  
  2143.  
  2144.     *** Version 1.8beta (Sep. 19, 1993) ***
  2145.  
  2146.     Released only to a small number of beta testers.
  2147.  
  2148.       o  Dictionary manager dictman.exe added.
  2149.       o  File specific dictionary, multiple user dictionary support.
  2150.       o  Accepts foreign characters by
  2151.           (i) extended ASCII code (e.g., 129 for umlaut u etc.), and/or
  2152.           (ii) TeX/LaTeX commands (e.g., \"u, \H{o}, \L, \ss etc.).
  2153.       o  Much better interface w/ mouse support.
  2154.       o  Multilevel undo up to 400 steps
  2155.       o  Better TeX/LaTeX support including the math-ignore mode.
  2156.       o  Better word suggestion scheme for capitalized words.
  2157.       o  Deleted hundreds of misspelled words from base.dic.
  2158.       o  Numerous little improvements.
  2159.       o  Bug fix:
  2160.          (i) Occasional name switching of the input file
  2161.            <filename>.<ext> and the backup file <filename>.bak when
  2162.            the input file is large (e.g., above 300K bytes).
  2163.  
  2164.  
  2165.     *** Version 1.01 (Jun. 3, 1993) ***
  2166.  
  2167.       Fixed some bugs related to the installation.  Made available by
  2168.       anonymous FTP at
  2169.         garbo.uwasa.fi:pc/spell/jspel101.zip, and
  2170.         Simtel (and its mirrors sites) msdos/tex/jspel101.zip
  2171.  
  2172.  
  2173.     *** Version 1.0 (May 29, 1993) ***
  2174.  
  2175.       First public release.  Made available by anonymous FTP at
  2176.         garbo.uwasa.fi:pc/spell/jspell10.zip
  2177. Index
  2178.  
  2179.     Not prepared for this shareware version.
  2180.  
  2181.